<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Javascript</title>
	</head>
	<body>
	</body>
</html>
<!-- 179000934唐国橼 -->
<script type="text/javascript">
	// var large = prompt("行数：");
	for (var i = 1; i <= 5; i++) { //画三角型
		for (var j = 1; j <= 5 - i; j++) {
			document.write("&nbsp;" + "&nbsp;");
		}
		for (var k = 1; k <= i; k++) {
			document.write("*" + "&nbsp;" + "&nbsp;" + "&nbsp");
		}
		document.write("<br/>"); //
		
	}

	for (var h = 1; h <= 5; h++) { //画平行四边形
		for (var s = 0; s <= 4 - h; s++) {
			document.write("&nbsp;" + "&nbsp;");
		}
		for (var n = 1; n <= 5; n++) {
			document.write("*" + "&nbsp;" + "&nbsp;" + "&nbsp;");
		}
		document.write("<br/>"); //换行
	}

	for (var c = 1; c <= 5; c++) { //画菱形
		if (c <= 3) {
			for (var d = 1; d <= 3 - c; d++) {
				document.write("&nbsp;" + "&nbsp;" + "&nbsp;" + "&nbsp;" + "&nbsp;");
			}
			for (var f = 1; f <= c * 2 - 1; f++) {
				document.write("*" + "&nbsp;" + "&nbsp;" + "&nbsp;" + "&nbsp;");
			}
		} else {
			for (var g = 1; g <= c - 3; g++) {
				document.write("&nbsp;" + "&nbsp;" + "&nbsp;" + "&nbsp;" + "&nbsp;");
			}
			for (var h = 10; h >= c * 2; h--) {
				document.write("*" + "&nbsp;" + "&nbsp;" + "&nbsp;" + "&nbsp;");
			}
		}
		document.write("<br/>"); //换行
	}
</script>
